package com.shao.onlinepdf.controller;

import com.alibaba.fastjson.JSONObject;
import com.shao.onlinepdf.service.ITDocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * @author shaohuailin
 * @date 2021/9/7
 */
@RestController
@RequestMapping("/document")
public class DocumentController {

    @Autowired
    private ITDocumentService documentService;

    @PostMapping("/livePdf")
    public void livePdf(@RequestBody JSONObject body, HttpServletResponse response){
        documentService.livePdf(body, response);
    }
}
